home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / Freeware / Swf_Player / Player / swfplayer.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-11-17  |  2.8 KB  |  99 lines

  1. /*
  2. **
  3. ** $VER: swfplayer.h 0.4 (03.10.02)
  4. ** Description
  5. **
  6. ** (C) Copyright 1999 Paul Hill
  7. ** (C) Copyright 2002 Alexandre Balaban
  8. **
  9. ** $HISTORY :
  10. **        - 0.4, 03.10.02 : Added LOOPPLAY in menu ID enum
  11. **        - 0.3, 05.09.02 : Added TRACE macro for debuging
  12. **        - 0.2, 27.07.02 : New attributes added into _swfinfo struct
  13. **        - 0.1, 27.02.99 : Original version by Paul Hill
  14. **
  15. */
  16.  
  17. #ifndef SWFPLAYER_H
  18. #define SWFPLAYER_H
  19.  
  20. #include "flash.h"
  21.  
  22.  
  23. struct _swfinfo
  24. {
  25.   struct Screen *screen;            /* The screen our window lives on */
  26.   struct Window *window;            /* The window we render ShockWave gfx to */
  27.   struct FlashInfo fi;                /* Handle for the Flash lib */
  28.   char *filename;                    /* Filename of the current SWF file */
  29.   struct RastPort *rport;            /* RastPort of out window */
  30.   struct RastPort *tmprport;        /* Temp rastport for kick3.0 writepixelarray() */
  31.   UWORD winbordertop;                /* win->bordertop */
  32.   UWORD winborderleft;                /* win->borderleft */
  33.   struct Menu *SWFPlayerMenus;    /* Our window's menus */
  34.   struct Task *task;                /* Our task */
  35.   ULONG filesize;                    /* Filesize of the current SWF file */
  36.   char *buffer;                        /* */
  37.   UBYTE *pubscreenname;            /* */
  38.   //    ULONG modeid;                        /* ModeId of screen to use (fullscreen only) */
  39.   UWORD width;                        /* Width of the SWF file */
  40.   UWORD height;                        /* Height of the SWF file */
  41.   UWORD depth;                        /* Depth of our screen */
  42.   UBYTE kick31;                        /* Are we running on > kickstart 3.1 ? */
  43.   //    UBYTE fullscreen;                    /* Are we running in full screen mode */
  44.   //    UBYTE displayinuse;                /* If TRUE don't directly access the screens bitplanes */
  45.   //    UBYTE usefastc2p;                    /* Should we use a custom fast C2P routine?  (only available in fullscreen bitplane mode) */
  46.   UBYTE oldtaskpri;
  47.   FlashDisplay * fd;
  48. };
  49.  
  50. enum {  OPT_FILE=0,
  51.         OPT_PUBSCREEN,
  52.         OPT_INFO,
  53.         OPT_MONO,
  54.         OPT_MAXWIDTH,
  55.         OPT_MAXHEIGHT,
  56.         OPT_ACTIVEPLAY,
  57.         OPT_COUNT };
  58.  
  59. enum {    MENU_OPEN=1,
  60.         MENU_INFO,
  61.         MENU_ABOUT,
  62.         MENU_QUIT,
  63.         MENU_PAUSE,
  64.         MENU_CONTINUE,
  65.         MENU_REWIND,
  66.         MENU_ZOOMIN,
  67.         MENU_ZOOMOUT,
  68.         MENU_STEP,
  69.         MENU_SEPERATE,
  70.         MENU_VOLOFF,
  71.         MENU_VOLQUIET,
  72.         MENU_VOLLOUD,
  73.         MENU_SAFEASDEF,
  74.         MENU_LOOPPLAY, // [ABA, 03/10/2002 : added LOOP setting menu]
  75.         MENU_MAX };
  76.  
  77. extern struct _swfinfo swfinfo;
  78. extern struct WBStartup *_WBenchMsg;
  79. extern struct timerequest *TimerIO;
  80. extern struct MsgPort *TimerMP;
  81. extern LONG args[OPT_COUNT];
  82.  
  83. int open_swf_window( );
  84. void close_swf_window( );
  85. ULONG playMovie( FlashHandle flashHandle, struct Screen *screen, struct Window *movie );
  86. void swf_showinfo( );
  87. void showUrl( char * url, char * target, void * client_data);
  88.  
  89. #define MAXPATH 1024
  90.  
  91. //#define DEBUG
  92. #ifdef DEBUG
  93. #define TRACE printf
  94. #else
  95. #define TRACE(fmt,args...)
  96. #endif
  97.  
  98. #endif /* SWFPLAYER_H */
  99.